package com.shy.configs.mvc.models.query;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class UserEditQuery {
    private String id;

    @NotNull(message = "登录名称不能为空")
    @Size(min = 5,max = 20,message = "登录名称长度在{min}-{max}之间")
    private String loginName;

    @NotNull(message = "手机号不能空")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号格式错误")
    private String phone;

    @NotNull(message = "商户名称不能空")
    @Size(min = 2,max = 80,message = "商户名称长度在{min}-{max}之间")
    private String shopName;

    @NotNull(message = "经营范围不能空")
    @Size(min = 10,max = 160,message = "经营范围长度在{min}-{max}之间")
    private String shopScope;

    @NotNull(message = "邮箱不能空")
    @Size(min = 2,max = 50,message = "邮箱长度错误")
    @Email(message = "邮箱格式错误")
    private String userEmail;
}
